{% load i18n mezzanine_tags comment_tags %}
<div id="comments">
    <h2>Comments</h2>
    {% comment_thread object_for_comments %}
</div><!-- /#comments -->


{% if settings.COMMENTS_DISQUS_SHORTNAME %}
{% include "generic/includes/disqus_comments.html" %}
{% else %}

<style>.input_id_honeypot {display:none !important;}</style>

<div class="comment-form-wrapper">
    <h2>Leave a Comment</h2>
    <form method="post" id="commentform" class="forms" action="{{ comment_url }}#comment">
        {% if not request.POST.replied_to %}
            {% fields_for posted_comment_form %}
        {% else %}
            {% fields_for unposted_comment_form %}
        {% endif %}
        <div class="form-actions">
            <button class="btn btn-default btn-submit" type="submit">{% trans 'Comment' %}</button>
        </div>
    </form>
    {% endif %}
</div>

<script>
    $(document).ready(function () {
        $('li.reply a').click(function () {            
            $('.comment-reply-form').hide();
            $(this).parent().parent().next('.comment-reply-form').toggle();
        });
    });
</script>


